package top.zhangjianyong.blog.portal.controller;

import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.zhangjianyong.blog.params.user.UserSkillListParam;
import top.zhangjianyong.blog.response.ApiResponse;
import top.zhangjianyong.blog.service.UserSkillService;

/**
 * 前台用户技能控制器
 *
 * @author zhangjianyong
 * @since 2024/7/1
 */
@RestController("portalUserSkillController")
@RequestMapping("/portal/user-skill")
public class UserSkillController {

  @Resource private UserSkillService userSkillService;

  /** 获取用户技能列表（前台展示） */
  @PostMapping("/list")
  public ApiResponse list(@RequestBody @Validated UserSkillListParam param) {
    return userSkillService.listByUserId(param.userId());
  }
}
